/**      
 * @file		forArray.cpp
 * @description	Demonstrates outputting an array of elements
 *				by using a for loop
 * @course		CSCI 123 Section 00000
 * @assignment 
 * @date		mm/dd/yyyy
 * @author		Brad Rippe (00000000) brippe@fullcoll.edu
 * @version		1.0
 */
#include <iostream>
using namespace std;

/**
 * @return zero if the application executes successfully
 */
int main() {
	// declares the array
	int intsArray[10];

	// Arrays are indexed from 0...size-1
	// This loop initializes all the values in the array
	// by multiplying the index times itself and assigning
	// the value to the element at i
	for(int i = 0; i < 10; i++) {
		intsArray[i] = i*i;
	}

	// Arrays are indexed from 0...size-1
	// output the values of intsArray
	for(int i = 0; i < 10; i++) {
		cout << "intsArray[" << i << "]=" << intsArray[i] << endl;
	}

	// Array elements can be used similarly to int variables
	// with the exception of the index operator "[]" used to
	// access a element in the array
	return 0;
}
